//
// Created by root on 19-8-5.
//

#include "sys_prop_utils.h"
#include <sys/system_properties.h>

std::string get_prop_value(std::string name) {
    using namespace std;
    char prop_buf[PROP_VALUE_MAX]={0};
    int prop_length= __system_property_get(name.c_str(),prop_buf);
    return string(prop_buf);
}

std::string get_phone_brand() {
    return get_prop_value("ro.product.brand");
}

bool is_sys_boot_completed(){
    using namespace std;
    string value_str=get_prop_value("sys.boot_completed");
    return value_str.compare("1")==0;
}
